package com.dslcode.cloud.shop.api.feign.hystrix;

import com.dslcode.cloud.common.dto.order.OrderCreateDTO;
import com.dslcode.cloud.common.dto.order.OrderDetailDTO;
import com.dslcode.cloud.common.dto.order.OrderPayDTO;
import com.dslcode.cloud.common.model.order.Order;
import com.dslcode.cloud.common.utils.AjaxResponse;
import com.dslcode.cloud.shop.api.feign.OrderProviderFeign;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by dongsilin on 2017/9/29.
 */
@Component
public class OrderProviderHystrix implements OrderProviderFeign {

    @Override
    public AjaxResponse<PageInfo<OrderPayDTO>> list(@RequestParam(name = "pageNum", defaultValue = "1") int pageNum, @RequestParam(name = "pageSize", defaultValue = "10") int pageSize) {
        return AjaxResponse.buildFailed();
    }

    @Override
    public AjaxResponse<OrderDetailDTO> detail(@PathVariable(name = "id") Long id) {
        return AjaxResponse.buildFailed();
    }

    @Override
    public AjaxResponse<Order> create(@RequestBody OrderCreateDTO orderCreate, @RequestParam(name = "userId", defaultValue = "1") Long userId) {
        return AjaxResponse.buildFailed();
    }

}
